
import { deleteStudent } from '@/util/actions/studentAction';

const DelectStudentButton = ({ id }) => {
   
//   const removeUserWithId = deleteStudent.bind(null, id);
const removeUserWithId = async () => {
    await deleteStudent(id);
  };

  const handleSubmit = (e) => {
    e.preventDefault();
    removeUserWithId();
  };

  return (
    <form onSubmit={handleSubmit}>
      {/* <input type='hidden' name='id' value={id} /> */}
      <button type='submit' className='bg-green-400 text-white text-xs rounded p-2'>
        删除
      </button>
    </form>
  );
};

export default DelectStudentButton;